{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Implementation of a Variational Quantum Eigensolver (VQE).\n",
    "\n",
    "The example shown here is from the paper \"Scalable Quantum Simulation of\n",
    "Molecular Energies\" by P.J.J. O'Malley et al. [arXiv:1512.06860v2](https://arxiv.org/abs/1512.06860v2)\n",
    "(Note that only the latest arXiv version contains the correct coefficients of\n",
    " the Hamiltonian)\n",
    "\n",
    "Eq. 2 of the paper shows the functional which one needs to minimize and Eq. 3\n",
    "shows the coupled cluster ansatz for the trial wavefunction (using the unitary\n",
    "coupled cluster approach). The Hamiltonian is given in Eq. 1. The coefficients\n",
    "can be found in Table 1. Note that both the ansatz and the Hamiltonian can be\n",
    "calculated using FermiLib which is a library for simulating quantum systems\n",
    "on top of ProjectQ."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import projectq\n",
    "from projectq.ops import All, Measure, QubitOperator, TimeEvolution, X\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "from scipy.optimize import minimize_scalar\n",
    "\n",
    "# Data from paper (arXiv:1512.06860v2) table 1: R, I, Z0, Z1, Z0Z1, X0X1, Y0Y1\n",
    "raw_data_table_1 = [\n",
    "    [0.20,  2.8489, 0.5678, -1.4508, 0.6799, 0.0791, 0.0791],\n",
    "    [0.25,  2.1868, 0.5449, -1.2870, 0.6719, 0.0798, 0.0798],\n",
    "    [0.30,  1.7252, 0.5215, -1.1458, 0.6631, 0.0806, 0.0806],\n",
    "    [0.35,  1.3827, 0.4982, -1.0226, 0.6537, 0.0815, 0.0815],\n",
    "    [0.40,  1.1182, 0.4754, -0.9145, 0.6438, 0.0825, 0.0825],\n",
    "    [0.45,  0.9083, 0.4534, -0.8194, 0.6336, 0.0835, 0.0835],\n",
    "    [0.50,  0.7381, 0.4325, -0.7355, 0.6233, 0.0846, 0.0846],\n",
    "    [0.55,  0.5979, 0.4125, -0.6612, 0.6129, 0.0858, 0.0858],\n",
    "    [0.60,  0.4808, 0.3937, -0.5950, 0.6025, 0.0870, 0.0870],\n",
    "    [0.65,  0.3819, 0.3760, -0.5358, 0.5921, 0.0883, 0.0883],\n",
    "    [0.70,  0.2976, 0.3593, -0.4826, 0.5818, 0.0896, 0.0896],\n",
    "    [0.75,  0.2252, 0.3435, -0.4347, 0.5716, 0.0910, 0.0910],\n",
    "    [0.80,  0.1626, 0.3288, -0.3915, 0.5616, 0.0925, 0.0925],\n",
    "    [0.85,  0.1083, 0.3149, -0.3523, 0.5518, 0.0939, 0.0939],\n",
    "    [0.90,  0.0609, 0.3018, -0.3168, 0.5421, 0.0954, 0.0954],\n",
    "    [0.95,  0.0193, 0.2895, -0.2845, 0.5327, 0.0970, 0.0970],\n",
    "    [1.00, -0.0172, 0.2779, -0.2550, 0.5235, 0.0986, 0.0986],\n",
    "    [1.05, -0.0493, 0.2669, -0.2282, 0.5146, 0.1002, 0.1002],\n",
    "    [1.10, -0.0778, 0.2565, -0.2036, 0.5059, 0.1018, 0.1018],\n",
    "    [1.15, -0.1029, 0.2467, -0.1810, 0.4974, 0.1034, 0.1034],\n",
    "    [1.20, -0.1253, 0.2374, -0.1603, 0.4892, 0.1050, 0.1050],\n",
    "    [1.25, -0.1452, 0.2286, -0.1413, 0.4812, 0.1067, 0.1067],\n",
    "    [1.30, -0.1629, 0.2203, -0.1238, 0.4735, 0.1083, 0.1083],\n",
    "    [1.35, -0.1786, 0.2123, -0.1077, 0.4660, 0.1100, 0.1100],\n",
    "    [1.40, -0.1927, 0.2048, -0.0929, 0.4588, 0.1116, 0.1116],\n",
    "    [1.45, -0.2053, 0.1976, -0.0792, 0.4518, 0.1133, 0.1133],\n",
    "    [1.50, -0.2165, 0.1908, -0.0666, 0.4451, 0.1149, 0.1149],\n",
    "    [1.55, -0.2265, 0.1843, -0.0549, 0.4386, 0.1165, 0.1165],\n",
    "    [1.60, -0.2355, 0.1782, -0.0442, 0.4323, 0.1181, 0.1181],\n",
    "    [1.65, -0.2436, 0.1723, -0.0342, 0.4262, 0.1196, 0.1196],\n",
    "    [1.70, -0.2508, 0.1667, -0.0251, 0.4204, 0.1211, 0.1211],\n",
    "    [1.75, -0.2573, 0.1615, -0.0166, 0.4148, 0.1226, 0.1226],\n",
    "    [1.80, -0.2632, 0.1565, -0.0088, 0.4094, 0.1241, 0.1241],\n",
    "    [1.85, -0.2684, 0.1517, -0.0015, 0.4042, 0.1256, 0.1256],\n",
    "    [1.90, -0.2731, 0.1472,  0.0052, 0.3992, 0.1270, 0.1270],\n",
    "    [1.95, -0.2774, 0.1430,  0.0114, 0.3944, 0.1284, 0.1284],\n",
    "    [2.00, -0.2812, 0.1390,  0.0171, 0.3898, 0.1297, 0.1297],\n",
    "    [2.05, -0.2847, 0.1352,  0.0223, 0.3853, 0.1310, 0.1310],\n",
    "    [2.10, -0.2879, 0.1316,  0.0272, 0.3811, 0.1323, 0.1323],\n",
    "    [2.15, -0.2908, 0.1282,  0.0317, 0.3769, 0.1335, 0.1335],\n",
    "    [2.20, -0.2934, 0.1251,  0.0359, 0.3730, 0.1347, 0.1347],\n",
    "    [2.25, -0.2958, 0.1221,  0.0397, 0.3692, 0.1359, 0.1359],\n",
    "    [2.30, -0.2980, 0.1193,  0.0432, 0.3655, 0.1370, 0.1370],\n",
    "    [2.35, -0.3000, 0.1167,  0.0465, 0.3620, 0.1381, 0.1381],\n",
    "    [2.40, -0.3018, 0.1142,  0.0495, 0.3586, 0.1392, 0.1392],\n",
    "    [2.45, -0.3035, 0.1119,  0.0523, 0.3553, 0.1402, 0.1402],\n",
    "    [2.50, -0.3051, 0.1098,  0.0549, 0.3521, 0.1412, 0.1412],\n",
    "    [2.55, -0.3066, 0.1078,  0.0572, 0.3491, 0.1422, 0.1422],\n",
    "    [2.60, -0.3079, 0.1059,  0.0594, 0.3461, 0.1432, 0.1432],\n",
    "    [2.65, -0.3092, 0.1042,  0.0614, 0.3433, 0.1441, 0.1441],\n",
    "    [2.70, -0.3104, 0.1026,  0.0632, 0.3406, 0.1450, 0.1450],\n",
    "    [2.75, -0.3115, 0.1011,  0.0649, 0.3379, 0.1458, 0.1458],\n",
    "    [2.80, -0.3125, 0.0997,  0.0665, 0.3354, 0.1467, 0.1467],\n",
    "    [2.85, -0.3135, 0.0984,  0.0679, 0.3329, 0.1475, 0.1475]]\n",
    "\n",
    "\n",
    "def variational_quantum_eigensolver(theta, hamiltonian):\n",
    "    \"\"\"\n",
    "    Args:\n",
    "        theta (float): variational parameter for ansatz wavefunction\n",
    "        hamiltonian (QubitOperator): Hamiltonian of the system\n",
    "    Returns:\n",
    "        energy of the wavefunction for parameter theta\n",
    "    \"\"\"\n",
    "    # Create a ProjectQ compiler with a simulator as a backend\n",
    "    eng = projectq.MainEngine()\n",
    "    # Allocate 2 qubits in state |00>\n",
    "    wavefunction = eng.allocate_qureg(2)\n",
    "    # Initialize the Hartree Fock state |01>\n",
    "    X | wavefunction[0]\n",
    "    # build the operator for ansatz wavefunction\n",
    "    ansatz_op = QubitOperator('X0 Y1')\n",
    "    # Apply the unitary e^{-i * ansatz_op * t}\n",
    "    TimeEvolution(theta, ansatz_op) | wavefunction\n",
    "    # flush all gates\n",
    "    eng.flush()\n",
    "    # Calculate the energy.\n",
    "    # The simulator can directly return expectation values, while on a\n",
    "    # real quantum devices one would have to measure each term of the\n",
    "    # Hamiltonian.\n",
    "    energy = eng.backend.get_expectation_value(hamiltonian, wavefunction)\n",
    "    # Measure in order to return to return to a classical state\n",
    "    # (as otherwise the simulator will give an error)\n",
    "    All(Measure) | wavefunction\n",
    "    return energy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEWCAYAAABxMXBSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpY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yPJBHpiuuqeoDXRbKpIDk5Oaxdu5Z9+/bFOhRjTCWqXbs2zZo1o2bNmge9jZglDlXNFZGrgfdw3TI/qapfihsfe7GqzsBVTR0GTPO6Sf5JVc+KVczVydq1a6lTpw5paWlIiVFljTHVkaqydetW1q5dS6tWrQ56OzEdj0NV38Z1wR0876ag6X6VHlSC2LdvnyUNYxKMiNCgQQPKewFRlWgcryzZ2XDnne5vIrCkYUziqYj/exsB0LNgAfTsCfn5UKsWzJ4NWVmxjsoYY+KPlTg8H34IubkucRw4AHPnxjqi6m/jxo1ceOGFtG7dmvT0dLKysnj11crvhDUtLY0tW7aUviKwevVqnnuu+BAQB79eVTdt2jTatm1L7969K3S748eP5957763QbY4cOZLp06cf9OvLG1N59x9PLHF4evUCEfdISXHPTfSoKmeffTannnoqq1atYsmSJbzwwgusXbu2xLq5ubkxiDC0qpg4ovn+PfHEEzz22GPMmTOn9JWrmMr63uXl5VXKfiqSJQ5PVha0bQtHH23VVOFUZBvQBx98QEpKCldccUXBvJYtW3LNNdcA8PTTT3PWWWfRp08f+vbti6pyww030KFDBzp27MiLL7rB9ubOncugQYMKtnH11Vfz9NNPA64kcfPNN9OtWzc6duzI119/DcDWrVvp378/7du3Z9SoUYTrr+3DDz+kS5cudOnSha5du7Jr1y7GjRvHRx99RJcuXbjvvvtYvXo1PXr0oFu3bnTr1o0FC9yIt8XXy8vL44YbbqB79+506tSJRx55JOQ+n332WTIzM+nSpQuXX355wUnlsMMO48Ybb6Rz586ceOKJbNzohozfvHkz5557Lt27d6d79+58/PHHgPt1fMkll3DyySdzySWXsHfvXoYNG0a7du0YMmQIJ5xwAosXL+bJJ5/kuuuuK9j/Y489xh//+McScT3//PN07NiRDh06MHbsWABuvfVW5s+fz2WXXcYNN9xQZP25c+fSs2dPBg8eTOvWrRk3bhxTp04lMzOTjh078v333wMuwfbp04dOnTrRt29ffvrppxL7/v777xkwYADp6en06NGj4HPcuHEjQ4YMoXPnznTu3JkFCxawevVqOnToUPDae++9l/Hjx5fY5q233kr37t3p0KEDo0ePLvgO9OrVi+uuu46MjAweeOCBEq9bsWIFvXr1onXr1kycOBGAm266ifvvv79gnRtvvJEHHngAVeXqq6/m+OOPp1+/fmzaVHhHQVpaGmPHjqVbt25MmzaNpUuXcuKJJ9KpUyeGDBnC9u3bAVi0aBGdOnWiS5cuBd9/IOz3ae7cufTq1YvzzjuPNm3acNFFF4X9fpeLqla7R3p6uh6MgQNVu3Y9qJdWOStWrCiYvvZa1Z49Iz+6dFFNSlIF97dLl8jrX3tt5P0/8MADet1114Vd/tRTT+lRRx2lW7duVVXV6dOna79+/TQ3N1d//vlnbd68ua5fv17nzJmjAwcOLHjdVVddpU899ZSqqrZs2VInTpyoqqoPPvigXnbZZaqqes011+gtt9yiqqpvvvmmArp58+YSMQwaNEjnz5+vqqq7du3SnJycEvvbs2eP/vrrr6qqunLlSg1894qv98gjj+htt92mqqr79u3T9PR0XbVqVZH9rVixQgcNGqQHDhxQVdUrr7xSJ0+erKqqgM6YMUNVVW+44YaCbQ0fPlw/+ugjVVX98ccftU2bNqqqevPNN2u3bt107969qqo6YcIEHT16tKqqfv7555qcnKyLFi3SXbt2aevWrQv2mZWVpcuXLy8S17p167R58+a6adMmzcnJ0d69e+urr76qqqo9e/bURYsWlXjv5syZo/Xq1dP169frvn37tGnTpnrTTTepqur999+v13pfkEGDBunTTz+tqqpPPPGEDh48uCD+CRMmqKpqnz59dOXKlaqqunDhQu3du7eqqg4bNkzvu+8+VVXNzc3VHTt26A8//KDt27cviGPChAl68803q6rqiBEjdNq0aaqqBd8rVdWLL7644L3t2bOnXnnllSWOJxBTVlaW7tu3Tzdv3qxHHHGEHjhwQH/44Qft6p048vLytHXr1rplyxZ9+eWXC76z69at03r16hXsv2XLlnr33XcXbLtjx446d+5cVVX9xz/+UfD+tG/fXhcsWKCqqmPHji04tnDfpzlz5mjdunV1zZo1mpeXpyeeeGLB9yNY8P9/AO42CF/nWGscD5KaCsuXxzqK+LRzp2v/Afd3506o52eUaZ+uuuoq5s+fT0pKCosWLQLgtNNO44gjjgBg/vz5DB8+nOTkZBo3bkzPnj1ZtGgRdevWjbjdc845B4D09HReeeUVAObNm1cwPXDgQA4//PCQrz355JO5/vrrueiiizjnnHNo1qxZiXVycnK4+uqrWbp0KcnJyaxcuTLktt5//32WL19eUMe9c+dOvv322yLX0s+ePZslS5bQvbsbBvzXX3+lUaNGAKSkpBSUrNLT05k5cyYAs2bNYsWKgn5B+eWXX9i9ezcAZ511FoccckjB+3fttdcC0KFDBzp16gS4kkyfPn148803adu2LTk5OXTs2LFI7IsWLaJXr14EuvK56KKLmDdvHmeffXbIYw3o3r07TZq44b6PPvpo+vfvD0DHjh0Lqrays7MLPotLLrmEv/zlL0W2sXv3bhYsWMDQoUML5u3f7zqQ+OCDD5gyZQoAycnJ1KtXr+CXemnmzJnDPffcw969e9m2bRvt27fnzDPPBOD888N3wD1w4EBq1apFrVq1aNSoERs3biQtLY0GDRrw2WefsXHjRrp27UqDBg2YN29ewXe2adOm9OnTp8i2AvvZuXMnO3bsoGdPNzLviBEjGDp0KDt27GDXrl1kedUfF154IW+++SYQ/vuUkpJCZmZmwXe1S5curF69mlNOOcXX++KXJY4gDRvC5s2g6to6EkVQKTus7Gzo29ddOJCSAlOnlq86r3379rz88ssFzx988EG2bNlCRkZGwbxDDz201O3UqFGD/EBGgxJ3wteqVQtwJ5bS6qwffPBBHnvsMQDefvttxo0bx8CBA3n77bc5+eSTee+990q85r777qNx48YsW7aM/Px8ateuHXLbqsqkSZM4/fTTw+5fVRkxYgR33nlniWU1a9YsuIwy+Fjy8/NZuHBhyP36ef8ARo0axR133EGbNm249NJLfb3Gj8B7D5CUlFTwPCkpyXf7QX5+PvXr12fp0qW+1i/t+xCYN2bMGBYvXkzz5s0ZP358kfUivW/BxxT8OYwaNYqnn36an3/+md///ve+YvX7+YQS7vs0d+7csDFWJGvjCJKaCvv2wd69sY4k/mRlubaf226rmDagPn36sG/fPh566KGCeXsjvPE9evTgxRdfJC8vj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Z/HyKAxYYyx3nGNKSsROUxVd3u/7l/FdYdf/GTvd1u9gD+r6qB4iakieA3uu1X13ljFYKLHShzGlN14r3T0Ba79oTzDhh4AOkixGwBjHFO5iMgE4GL8t5uYKsZKHMYYY8rEShzGGGPKxBKHMcaYMrHEYYwxpkwscRhjjCkTSxzGGGPK5P8BDP+TWmm69e4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x106362ed0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "lowest_energies = []\n",
    "bond_distances = []\n",
    "for i in range(len(raw_data_table_1)):\n",
    "    # Use data of paper to construct the Hamiltonian\n",
    "    bond_distances.append(raw_data_table_1[i][0])\n",
    "    hamiltonian = raw_data_table_1[i][1] * QubitOperator(())  # == identity\n",
    "    hamiltonian += raw_data_table_1[i][2] * QubitOperator(\"Z0\")\n",
    "    hamiltonian += raw_data_table_1[i][3] * QubitOperator(\"Z1\")\n",
    "    hamiltonian += raw_data_table_1[i][4] * QubitOperator(\"Z0 Z1\")\n",
    "    hamiltonian += raw_data_table_1[i][5] * QubitOperator(\"X0 X1\")\n",
    "    hamiltonian += raw_data_table_1[i][6] * QubitOperator(\"Y0 Y1\")\n",
    "\n",
    "    # Use Scipy to perform the classical outerloop of the variational\n",
    "    # eigensolver, i.e., the minimization of the parameter theta.\n",
    "    # See documentation of Scipy for different optimizers.\n",
    "    minimum = minimize_scalar(lambda theta: variational_quantum_eigensolver(theta, hamiltonian))\n",
    "    lowest_energies.append(minimum.fun)\n",
    "\n",
    "# print result\n",
    "plt.xlabel(\"Bond length [Angstrom]\")\n",
    "plt.ylabel(\"Total Energy [Hartree]\")\n",
    "plt.title(\"Variational Quantum Eigensolver\")\n",
    "plt.plot(bond_distances, lowest_energies, \"b.-\",\n",
    "         label=\"Ground-state energy of molecular hydrogen\")\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
